package cn.yunhe.dao;

import cn.yunhe.entity.Field;
import cn.yunhe.entity.Question;
import cn.yunhe.entity.QuestionType;
import cn.yunhe.entity.User;
import cn.yunhe.pojo.UserQuestionHisErrorprac;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository("userQuestionHisErrorpracDao")
public interface UserQuestionHisErrorpracDao {
    public List<UserQuestionHisErrorprac> getQuesHisErrorPrac(@Param("user") User user, @Param("field") Field field, @Param("questionType")QuestionType questionType);
    public int getAllErrorTitle(@Param("user") User user, @Param("field") Field field, @Param("questionType")QuestionType questionType);
    public String getQyNameById(int id);
    public String getfieldNameById(int id);
    //用户练习的插入
    public  boolean insertpracanswer(@Param("qid") int qid,@Param("uid") int uid,@Param("qyid") int qyid,@Param("isrignt") int isright);

    public Question selectQuesById(int id);

    public int selectQHisByid(int qid);

    public boolean updatepracuqh(@Param("qid")int qid,@Param("isright")int isright);
}
